{% extends "tcms_base.html" %}
{% load report_tags %}
{% load static %}
{% block subtitle %}Reporting - {{ product }}{% endblock %}

{% block custom_javascript %}
<script type="text/javascript" src="{% static 'js/report.js' %}"></script>
<script type="text/javascript">
Nitrate.Utils.after_page_load(Nitrate.Report.List.on_load);
</script>
{% endblock %}

{% block contents %}
<div id="content">
	{% include 'report/nav.html' %}
	<div class="Detailform border-1" style="background:#f1f1f1">
		<div class="report">
			<table class="report_tb" collspan="0" cellspacing="0" border="0">
				<tr class="attrib_line">
					<td  colspan="3">Testing Runs</td>
				</tr>
				<tr>
					<td>Finished</td>
					<td>{{ runs_count.finished }}</td>
					<td>{{ runs_count.finished|default:0|percentage:runs_count.TOTAL }}</td>
				</tr>
				<tr>
					<td>Running</td>
					<td>{{ runs_count.running }}</td>
					<td>{{ runs_count.running|default:0|percentage:runs_count.TOTAL }}</td>
				</tr>
				<tr class="attrib_line" >
					<td colspan="3">Case Runs</td>
				</tr>
				<tr>
					<td>PASSED</td>
					<td>{{ case_run_count.PASSED }}</td>
					<td>{{ case_run_count.PASSED|default:0|percentage:case_run_count.TOTAL }}</td>
				</tr>
				<tr>
					<td>FAILED</td>
					<td>{{ case_run_count.FAILED }}</td>
					<td>{{ case_run_count.FAILED|default:0|percentage:case_run_count.TOTAL }}</td>
				</tr>
				<tr>
					<td>IDLE</td>
					<td>{{ case_run_count.IDLE }}</td>
					<td>{{ case_run_count.IDLE|default:0|percentage:case_run_count.TOTAL }}</td>
				</tr>
				<tr>
					<td>ERROR</td>
					<td>{{ case_run_count.ERROR }}</td>
					<td>{{ case_run_count.ERROR|default:0|percentage:case_run_count.TOTAL }}</td>
				</tr>
				<tr>
					<td>PAUSED</td>
					<td>{{ case_run_count.PAUSED }}</td>
					<td>{{ case_run_count.PAUSED|default:0|percentage:case_run_count.TOTAL }}</td>
				</tr>
				<tr>
					<td>BLOCKED</td>
					<td>{{ case_run_count.BLOCKED }}</td>
					<td>{{ case_run_count.BLOCKED|default:0|percentage:case_run_count.TOTAL }}</td>
				</tr>
				<tr>
					<td>RUNNING</td>
					<td>{{ case_run_count.RUNNING }}</td>
					<td>{{ case_run_count.RUNNING|default:0|percentage:case_run_count.TOTAL }}</td>
				</tr>
				<tr>
					<td>WAIVED</td>
					<td>{{ case_run_count.WAIVED }}</td>
					<td>{{ case_run_count.WAIVED|default:0|percentage:case_run_count.TOTAL }}</td>
				</tr>
			</table>
		</div>
	
	</div>
</div><!--content over -->
{% endblock %}
